<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no,maximum-scale=1.0,minimum-scale=1.0">
        <title>
            test1
        </title>
        <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
    
        </script>
        <!-- 引入 layui.css -->
    <link href="./css/layui.css" rel="stylesheet" />

    <!-- 引入 layui.js -->
    <script src="./js/layui.js"></script>
    <script src="./js/utils.js"></script>
    <script src="./js/constant.js" ></script>
    <script src="./js/data.js"></script>
    <script src="./js/userAuth.js"></script>
    <script src="./js/request.js"></script>
    <script type="text/javascript">    
        $(document).ready(()=>{
            // init();
            console.log('history len:',history.length);
        })

        window.addEventListener("popstate",function(){
            alert("run popstate");
        })

        function push2test(){
            
            navigateTo("/v1/test2.html","push")
        }
        function replace2test(){
            navigateTo("/v1/test2.html","replace")
        }

    </script>
    </head>
    <body>

            <div onclick="push2test()">
                push to test2
            </div>

            <div onclick="replace2test()">
                replace to test2;
            </div>
    </body>
</html>